package restaurant;

/**
 * The Command object to get a tab.
 * 
 * @author Ebonie
 */

public class cmdGetTab implements Command
{

	/** The info. */
	private InformationAggregator info;

	/** The table no. */
	private int tableNo;



	/**
	 * Instantiates a new cmd get tab.
	 * 
	 * @param info the info
	 * @param tableNo the table no
	 */
	public cmdGetTab(InformationAggregator info, int tableNo) {

		this.info = info;
		this.tableNo = tableNo;
	}



	/**
	 * Execute.
	 * 
	 * @return the object
	 * @see restaurant.Command#execute()
	 */
	@Override
	public Object execute()
	{
		CustomerTabs tab = info.getTabs();
		return tab.getTableTab(tableNo);
	}

}
